import request from '@/utils/request'

// 查询字典类型列表
export function listTypeApi(data) {
  return request.get('/system/dict-type/list', data)
}

// 查询字典类型详细
export function infoTypeApi(dictId) {
  return request.get('/system/dict-type/info', { id: dictId })
}

// 新增字典类型
export function addTypeApi(data) {
  return request.post('/system/dict-type/add', data)
}

// 修改字典类型
export function editTypeApi(data) {
  return request.post('/system/dict-type/edit', data)
}

// 删除字典类型
export function delTypeApi(typeId) {
  return request.post('/system/dict-type/delete', { id: typeId })
}

// 刷新字典缓存
export function refreshCacheApi() {
  return request.post('/system/dict-type/cache')
}

// 导出
export function exportTypeApi(data) {
  request.download('/system/dict-type/export', data)
}
